import { createRouter, createWebHashHistory } from 'vue-router' //引入
import login  from '../view/login/login.vue'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
         {
            path: '/',
            component: login
         },
         {
            path: '/upload',
            component:(() => import('../view/upload/index.vue'))
         },
         {
            path: '/user',
            component:(() => import('../view/Layout/user/index.vue'))
         },
         {
            path: '/teacher',
            component:(() => import('../view/Layout/teacher/index.vue'))
         },
         {
            path: '/qiniu',
            component:(() => import('../view/Layout/qiniu/index.vue'))
         },
         {
            path: '/management/home',
            component:(() => import('../view/management/home/index.vue')),
            children:[
               {
                  path: 'accAdd',
                  component:(() => import('../view/management/acc/accAdd.vue'))
               },
               {
                  path: 'accList',
                  component:(() => import('../view/management/acc/accList.vue'))
               },
               {
                  path: 'shopinfo',
                  component:(() => import('../view/management/shopinfo/index.vue'))
               },
               {
                  path: 'dnd',
                  component:(() => import('../view/management/dnd/index.vue'))
               },
            ]
         },
    ]
})

export default router
